from manimlib import *

class InteractiveDevelopment(Scene):
    """ 交互式开发 """
    def construct(self):
        circle = Circle()
        circle.set_fill(BLUE,opacity=0.5)
        circle.set_stroke(BLUE_E,width=4)
        square = Square()
        
        self.play(ShowCreation(square))
        self.wait()
        
        # self.embed()
        # 拷贝下面代码到 交互终端
        self.play(ReplacementTransform(square, circle))
        self.wait()
        self.play(circle.animate.stretch(4,0))
        self.play()
        self.play(Rotate(circle,90*DEGREES))
        self.wait()
        self.play(circle.animate.shift(2*RIGHT))
        self.wait()
        self.play(circle.animate.scale(0.25))
        self.wait()
        text = Text("""
In general, using the interactive shell
is very helpful when developing new sneces
通常使用交互shell,开发新场景更高效
            """)
        self.play(Write(text))
        always(circle.move_to, self.mouse_point)
        